"use strict";
let tom = {
    username: "Tom",
    gender: 0,
    isMarry: undefined,
    run(speed, unit) {
        return "";
    },
    sing(musicname) {
        return musicname;
    },
    money: "一个亿",
    typing: () => { }
    // typing(){}
};
// tom.gender=1;//只读属性不能被赋值
let re = tom.run(1, '米/s');
let users = [{ name: '老王', age: 18 }, { name: "王鸿", age: 19 }];
// users.push({
//     id:1,name:"Paul",age:20 //错误 因为User没有id属性
// })
users.push({ name: "Paul", age: 20, gender: 1 }); //正确
// 数组泛型
let members = [];
members.push({ name: "Jerry", age: 5 });
let vips = [
    { name: "谢老板", age: 20 },
    // {name:"佳仪",age:18,gender:1,hair:"长头发"} //错误的 User没有Hair属性
];
//接口继承的属性
let lenovo = {
    keybord: "机械键盘",
    price: 99.99
};
let ipad2021 = {
    size: "10.2寸",
    logo: "Apple",
    price: 1000
};
//接口一般用来规范 对象结构.
